import java.util.Scanner;

public class demo03 {
    //翻硬币
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str1=sc.nextLine();
        String str2=sc.nextLine();
        char[] arr1=str1.toCharArray();
        char[] arr2=str2.toCharArray();
        int count=0;
        for (int i = 0; i < str1.length()-1; i++) {
            if(arr1[i]!=arr2[i]){
                arr1[i]=arr1[i]=='*'?'o':'*';
                arr1[i+1]=arr1[i+1]=='*'?'o':'*';
                count++;
            }
        }
        System.out.println(count);
    }
}
